sig=@(s) 1+s-s;
T=0.5; num=50;
time=linspace(0,T,num+1);
sigval=sig(time);
mcpaths=rand(100000,num+1);
mcvar=sigval.*sum(mcpaths,1);
exactvar=time;
plot(time,mcvar);
hold on
plot(time,exactvar,'r');
